package controller;

import service.AdminService;
import service.impl.AdminServiceimpl;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author LiangHaiBo
 * @version 1.0
 * @date 2021.9.2 下午 23:33
 */
@WebServlet("/admindeleteuser")
public class AdminDeleteUserServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {


        String uid = request.getParameter("uid");
        AdminService adminService  = new AdminServiceimpl();
        adminService.deleteGet(uid);

        request.getRequestDispatcher("findUserByPage").forward(request,response);

    }
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
         doGet(request,response);
    }
}
